#include<stdlib.h>
#include<stdio.h>
#include "list.h"

void test1() {
	LTNode* plist = ListInit();
	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);
	ListPrint(plist);

	ListPushBack(plist, 4);
	ListPushBack(plist, 3);
	ListPushBack(plist, 2);
	ListPushBack(plist, 1);
	ListPrint(plist);

	LTNode* pos1 = ListFind(plist, 4);
	ListErase(pos1);
	ListPrint(plist);
	LTNode* pos2 = ListFind(plist, 3);
	ListInsert(pos2, 99);
	ListPrint(plist);

	ListDestroy(plist);
	free(plist);
	plist = NULL;
	//ListPrint(plist);

}
int main() {
	test1();

	return 0;
}